/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package my.ClientTorrent;

import java.util.ArrayList;

/**
 *
 * @author Wico
 */
public class TrackerResponse {
    private String failure_reason = null;
    private String warning_message = null;
    private int interval;
    private int complete;
    private int incomplete;
    private ArrayList<Peer> peers;
    
    public TrackerResponse() {
        peers = new ArrayList<Peer>();
    }

    
    @Override
    public String toString()
    {
        String result = new String();
        result += "Failure Reason = " + failure_reason + "\n";
        result += "Warning Message = " + warning_message + "\n";
        result += "Interval = " + interval + " detik\n";
        result += "Completed = " + complete + " buah\n";
        result += "Incompleted = " + incomplete + " buah\n";
        result += "List Peers = " + peers.size() + "\n";
        for (int i = 0; i < peers.size(); i++)
        {
            result += "             "; 
            result += i + ". " + peers.get(i);
        }
        return result;
    }
    /**
     * @return the failure_reason
     */
    public String getFailure_reason() {
        return failure_reason;
    }

    /**
     * @return the warning_message
     */
    public String getWarning_message() {
        return warning_message;
    }

    /**
     * @return the interval
     */
    public int getInterval() {
        return interval;
    }

    /**
     * @return the complete
     */
    public int getComplete() {
        return complete;
    }

    /**
     * @return the incomplete
     */
    public int getIncomplete() {
        return incomplete;
    }

    /**
     * @return the peers
     */
    public ArrayList<Peer> getPeers() {
        return peers;
    }

    /**
     * @param failure_reason the failure_reason to set
     */
    public void setFailure_reason(String failure_reason) {
        this.failure_reason = failure_reason;
    }

    /**
     * @param warning_message the warning_message to set
     */
    public void setWarning_message(String warning_message) {
        this.warning_message = warning_message;
    }

    /**
     * @param interval the interval to set
     */
    public void setInterval(int interval) {
        this.interval = interval;
    }

    /**
     * @param complete the complete to set
     */
    public void setComplete(int complete) {
        this.complete = complete;
    }

    /**
     * @param incomplete the incomplete to set
     */
    public void setIncomplete(int incomplete) {
        this.incomplete = incomplete;
    }

    /**
     * @param peers the peers to set
     */
    public void setPeers(ArrayList<Peer> peers) {
        this.peers = peers;
    }
    
    
}
